/*
 * init.h
 *
 *  Created on: May 25, 2018
 *      Author: yuantao
 */

#ifndef INIT_H_
#define INIT_H_

#include <memory>
#include <iostream>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <string.h>
#include <stdlib.h>

typedef struct _connection_config
{
	struct sockaddr_in remoteAddr;
	struct sockaddr_in localAddr;
}connection_config;

class CConfig
{
public:
    static class CConfig * getGlobleConfig(void);
    connection_config* getConnConfig(void);
    virtual ~CConfig();
private:
    CConfig();

    connection_config * m_pstConnectionConfig;

    static class CConfig * m_instance;
};

typedef enum
{
	NOT_RUN,
	RUNNING,
	STOPPING,
	STOP_FINISHED
}ThreadRunFlag;

#endif /* INIT_H_ */
